#include <stdio.h>
void fun(int a,int b,long *c)
{
    int shia=(a/10)%10; 
    int gea=a%10;
    int bishi=(b/10)%10;
    int bge=b%10;
    *c=shia*10+gea*1000+bishi*100+bge;
}
int main()
{	int a,b;
	long c;
	scanf("%d%d",&a,&b);
	fun(a,b,&c);
	printf("%ld\n",c);
}

